package app.vendorportal.api.marketplace;

import app.vendorportal.api.marketplace.data.request.FindOrderRequest;
import app.vendorportal.api.marketplace.data.request.FindOrderSubmissionStatusRequest;
import app.vendorportal.api.marketplace.data.request.SubmitOrderRequest;
import app.vendorportal.api.marketplace.data.response.FindOrderSubmissionStatusResponse;
import app.vendorportal.api.marketplace.data.response.MarketPlaceShipNotificationResponse;
import app.vendorportal.api.marketplace.data.response.MarketplaceSyncOrderResponse;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.validation.Valid;

/**
 * @author carl.you
 */
public interface MarketPlaceOrderAPIService {

    @RequestMapping(value = "/market/order/submit", method = RequestMethod.POST)
    @ResponseBody
    void submitOrder(@Valid @RequestBody SubmitOrderRequest request);

    @RequestMapping(value = "/market/order/status", method = RequestMethod.POST)
    @ResponseBody
    FindOrderSubmissionStatusResponse findOrderSubmissionStatus(@Valid @RequestBody FindOrderSubmissionStatusRequest request);


    @RequestMapping(value = "/market/order", method = RequestMethod.POST)
    @ResponseBody
    MarketplaceSyncOrderResponse findOrderResponse(@Valid @RequestBody FindOrderRequest request);


    @RequestMapping(value = "/market/order/ship-notification", method = RequestMethod.POST)
    @ResponseBody
    MarketPlaceShipNotificationResponse findOrderShipNotification(@Valid @RequestBody FindOrderRequest request);

}
